//fade implement
var Color= new Array();
Color[1] = "ff";
Color[2] = "ee";
Color[3] = "dd";
Color[4] = "cc";
Color[5] = "bb";
Color[6] = "aa";
Color[7] = "99";
function waittofade() {
	if (document.getElementById('fade')) {
        setTimeout("fadeIn(7)", 1000);
	 }
}

function fadeIn(where) {
    if (where >= 1) {
        document.getElementById('fade').style.backgroundColor = "#ffff" + Color[where];
		  if (where > 1) {
			  where -= 1;
			  setTimeout("fadeIn("+where+")", 200);
			} else {
			  where -= 1;
			  setTimeout("fadeIn("+where+")", 200);
			  document.getElementById('fade').style.backgroundColor = "transparent";
			}
    }
}

function selectProject() {
        var selector = $('projectSelector');
        if (selector.options[selector.selectedIndex].value != "")
          window.location.href = "/projects/" + selector.options[selector.selectedIndex].value + "/logs";
      }

var checkflag = "false";
function togglePeople(id) {
  field = document.getElementsByClassName( id );
  if (checkflag == "false") {
     for (i = 0; i < field.length; i++) {
        field[i].checked = true;
     }
    checkflag = "true";
  } else {
    for (i = 0; i < field.length; i++) {
      field[i].checked = false; 
    }
    checkflag = "false";
  }
}


    function getElement(aID)
    {
        return (document.getElementById) ?
            document.getElementById(aID) : document.all[aID];
    }

    function getIFrameDocument(aID){ 
        var rv = null; 
        var frame=getElement(aID);
        // if contentDocument exists, W3C compliant (e.g. Mozilla) 
        if (frame.contentDocument)
            rv = frame.contentDocument;
        else // bad IE  ;)
            rv = document.frames[aID].document;
        return rv;
    }
 function updateChart2(originalRequest) {  
            var a=originalRequest.responseText.replace(/"/g,"'"); 
            var chart = new FusionCharts("/charts/FCF_MSLine.swf", "ChartId", "500", "350"); 
            chart.setDataXML(a); 
           chart.render("chart");  
 }  

function addfavorite(url,name)
{
if (document.all)
{
window.external.addFavorite('http://' + url + '.trikr.com',name);
}
else if (window.sidebar)
{
window.sidebar.addPanel(name,'http://' + url + '.trikr.com','');
}
}
